<?php

class DesignTimeWorkflowNodeAction
{
  
  /**
   * @var string $class
   */
  protected $class;
  
  /**
   * @var string $identifier
   */
  protected $identifier;
  
  /**
   * @var array $options
   */
  protected $options;

  /**
   * @param string $class
   * @param string $identifier
   * @param array $options
   */
  public function __construct ($class, $identifier, array $options = array())
  {
    $this->class = $class;
    $this->identifier = $identifier;
    $this->options = $options;
  }

  /**
   * @param RunTimeWorkflowNode $node
   * @return AbstractRunTimeWorkflowNodeAction
   */
  public function createRunTimeNodeAction (RunTimeWorkflowNode $node)
  {
    return new $this->class($node, $this->identifier, $this->options);
  }

  /**
   * @return string
   */
  public function getIdentifier ()
  {
    return $this->identifier;
  }
}